On the Worst-Case Behavior of String-Searching Algorithms
نویسنده
چکیده
Any algorithm for finding a pattern of length k in a string of length n must examine at least n k + of the characters of the string in the worst case. By considering the pattern 00 0, we prove that this is the best possible result. Therefore there do not exist pattern matching algorithms whose worst-case behavior is "sublinear" in n (that is, linear with constant less than one), in contrast with the situation for average behavior (the Boyer-Moore algorithm is known to be sublinear on the average).
منابع مشابه
Fast and Practical Approximate String Matching
We present new algorithms for approximate string matching based in simple, but eecient, ideas. First, we present an algorithm for string matching with mismatches based in arithmetical operations that runs in linear worst case time for most practical cases. This is a new approach to string searching. Second, we present an algorithm for string matching with errors based on partitioning the patter...
متن کاملSequential and indexed two-dimensional combinatorial template matching allowing rotations
We present new and faster algorithms to search for a 2-dimensional pattern in a 2-dimensional text allowing any rotation of the pattern. This has applications such as image databases and computational biology. We consider the cases of exact and approximate matching under several matching models, using a combinatorial approach that generalizes string matching techniques. We focus on sequential a...
متن کاملFast Packed String Matching for Short Patterns
Searching for all occurrences of a pattern in a text is a fundamental problem in computer science with applications in many other fields, like natural language processing, information retrieval and computational biology. In the last two decades a general trend has appeared trying to exploit the power of the word RAM model to speed-up the performances of classical string matching algorithms. In ...
متن کاملBit-parallel string matching under Hamming distance in O(n[m/w]) worst case time
Given two strings, a pattern P of length m and a text T of length n over some alphabet Σ, we consider the string matching problem under k mismatches. The well– known Shift-Add algorithm (Baeza-Yates and Gonnet, 1992) solves the problem in O(ndm log(k)/we) worst case time, where w is the number of bits in a computer word. We present two algorithms that improve this result to O(ndm log log(k)/we)...
متن کاملPerformance Improvement of BMH and BMHS using PDJ (Possible Double Jump) and MValue (Match Value)
BM (Boyer-Moore) string matching algorithm and its enhanced versions like BMH and BMHS are a standard benchmark for single pattern string matching. Based on BMH and BMHS algorithms we have developed improved algorithms EBMH(Enhanced BMH)and EBMHS(Enhanced BMHS). These algorithms uses the newly introduced PDJ (possible double jump) and MValue(Match Value) concepts. While searching these concepts...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- SIAM J. Comput.
دوره 6 شماره
صفحات -
تاریخ انتشار 1977